<template>
  <div>
    <van-grid square column-num="4" icon-size="13vw">
    <van-grid-item v-for="(v,index) in arr" :key="index" :icon="v" :text="arr1[index]"  @click="weidian(index)"/>
    </van-grid>
    

  </div>
</template>

<script>

import service  from '../../utlis/request';
export default {
    data(){
        return{
           
          arr:[],
          arr1:[]

        }
    },
    mounted(){
        service({
            url:"http://localhost:3000/navigation",
            method:"get"

        }).then(res=>{
          res.data.forEach(element => {
                this.arr = element.data.myimg
                this.arr1 = element.data.hxtext
            })     
           
            
        })

    }


}
</script>

<style>

</style>